package handyio

import "errors"

const (
	ReadNext     = 1
	ReadByteSkip = 0
	ReadStop     = -1
)

var PdfRawReaderErrors = struct {
	NotSupportError error
}{
	NotSupportError: errors.New("NotSupportError"),
}

type PdfRawReader interface {
	// 如果是最后，则返回io.EOF
	NextByte() (byte, error)

	NextByteEquals(byte) bool
	NextBytesEquals([]byte) bool
	// 返回整数保留0忽略负数停止
	NextBytes(func(byte) int) []byte
	// 返回直到空白字符以前的所有字节
	NextBytesUntilWhiteSpace() []byte
	// 向后跳过所有空白字符
	SkipNextWhiteSpaces()
	SkipNextEndOfLine()
	//当前下标
	IndexCurrent() int64
	//最后下标
	IndexEnd() int64
	//移动下标，超出返回异常
	IndexMoveTo(int64) error

	NotSupport(string) error
	IsNotSupportError(error) bool
}
